package com.zhuimeng.provider.service.impl;

import com.zhuimeng.service.HelloService;
import org.apache.dubbo.config.annotation.Service;

import java.util.Random;

@Service
public class HelloService1Impl implements HelloService {
    @Override
    public String method1() {
        try {
            Thread.sleep(new Random().nextInt(10));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "调用方法一";
    }

    @Override
    public String method2() {
        try {
            Thread.sleep(new Random().nextInt(10));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "调用方法二";
    }

    @Override
    public String method3() {
        try {
            Thread.sleep(new Random().nextInt(10));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return "调用方法三";
    }
}
